import Search from 'models/search';

export default class UserListSearch extends Search {
  username = '';
  roleId = '';
  status = '';

  propertyList = ['username', 'roleId', 'status'];

  constructor() {
    super();
  }

  getObject(pagination) {
    let postData = {};

    this.setPostData(postData,this.propertyList);
    if (pagination !== undefined) {
      let {
        limit,
        page
      } = pagination.getObject();
      postData.limit = limit;
      postData.page = page;
    }

    return postData;
  }
}
